<?php

namespace catchAdmin\pc\tables;

use catchAdmin\pc\tables\forms\Factory;
use catcher\CatchTable;
use catcher\library\table\Actions;
use catcher\library\table\HeaderItem;
use catcher\library\table\Search;

class ZhaoPin extends CatchTable
{

    public function Table()
    {
        return $this
            ->getTable('zhaoPin')
            ->header([
                HeaderItem::label('公司名称')
                    ->prop('company_name'),
                HeaderItem::label('标题')
                    ->prop('title'),
                HeaderItem::label('提交时间')
                    ->prop('created_at'),
                HeaderItem::label('审核状态')
                    ->prop('audit_status_name'),
                HeaderItem::label('审核时间')
                    ->prop('audit_time_show'),
                HeaderItem::label('操作')
                    ->actions([
                        Actions::view(),
                    ])
                    ->width(260),
            ])
            ->withSearch([
                Search::label('标题')
                    ->text('title', '标题')
                    ->clearable(true),
            ])
            ->selectionChange()
            ->withApiRoute('zhaoPin')
            ->withActions([
            ])
            ->render();
    }


    public function form()
    {
        return Factory::create('zhaoPin');
    }

}
